<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>动画收集</title>
<style>
    button {
        display: block;
        position: relative;
        top: 0;
        border: 0;
        cursor: pointer;
        background: #9ccc65;
        color: white;
        border-radius: 3px;
        line-height: 1;
        font-size: 20px;
        padding: 15px 25px;
        outline: 0;
        margin: 20px;
        box-shadow: 0 5px 10px rgb(0 0 0 / 10%);
        overflow: hidden;
    }
    /*三角形*/
    .triangle-top{
        width: 0;
        height: 0;
        border-right: 50px solid transparent;
        border-left: 50px solid transparent;
        border-bottom: 50px solid #9ccc65;
    }
    .triangle-right{
        width: 0;
        height: 0;
        border-top: 50px solid transparent;
        border-bottom: 50px solid transparent;
        border-left: 50px solid #9ccc65;
    }
    .triangle-bottom{
        width: 0;
        height: 0;
        border-right: 50px solid transparent;
        border-left: 50px solid transparent;
        border-top: 50px solid #9ccc65;
    }
    .triangle-left{
        width: 0;
        height: 0;
        border-top: 50px solid transparent;
        border-bottom: 50px solid transparent;
        border-right: 50px solid #9ccc65;
    }
    /*按钮hover*/
    .box1{
        display: inline-block;
        background: #9ccc65;
    }
    .button-ujarak{
        width: 140px;
        height: 50px;
        line-height: 50px;
        text-align: center;
        padding: 0;
        margin: 0;
        background: none;
        border: 1px solid #9ccc65;
        color: #000;
        -webkit-transition: border-color 0.4s, color 0.4s;
        transition: border-color 0.4s, color 0.4s;
        z-index: 1;
    }
    .button-ujarak::before{
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: -1;
        opacity: 0;
        -webkit-transform: scale3d(0.7, 1, 1);
        transform: scale3d(0.7, 1, 1);
        -webkit-transition: -webkit-transform 0.4s, opacity 0.4s;
        transition: transform 0.4s, opacity 0.4s;
        -webkit-transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
        transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);/*贝塞尔曲线*/
    }
    .button-ujarak:hover::before{
        background: #fff;
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    /*纯色背景按钮闪光*/
    @-webkit-keyframes shine {
        0% {
            background-position-x: 400%;
        }
        50% {
            background-position-x: 0%;
        }
        100% {
            background-position-x: -400%;
        }
    }

    @keyframes shine {
        0% {
            background-position-x: 400%;
        }
        50% {
            background-position-x: 0%;
        }
        100% {
            background-position-x: -400%;
        }
    }
    
    .shiny {
        background: #9ccc65;
        background: linear-gradient(-45deg, #9ccc65 50%, #cde5b2 60%, #9ccc65 70%);
        background-size: 600% 100%;
        -webkit-animation: shine 20s infinite;
                animation: shine 20s infinite;
        -webkit-animation-delay: 0s;
                animation-delay: 0s;
        -webkit-animation-timing-function: linear;
                animation-timing-function: linear;
    }
    /*背景图片按钮闪光*/
    @-webkit-keyframes twinkling {
        0% {
            left: 0;
            opacity: .5;
        }

        50% {
            opacity: 1;
        }

        100% {
            left: 340px;
            opacity: 0;
        }
    }

    @keyframes twinkling {
        0% {
            left: 0;
            opacity: .5;
        }

        50% {
            opacity: 1;
        }

        100% {
            left: 340px;
            opacity: 0;
        }
    } 

    .twinkling {
        position: absolute;
        left: 0;
        top: 0;
        width: 50px; 
        height: 50px;
        background-image: -moz-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255,0.5),rgba(255,255,255,0));
        background-image: -webkit-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255,0.5),rgba(255,255,255,0));
        transform: skewx(-25deg);
        animation: twinkling 3s infinite; 
    }
    .button {
        width: 238px;
        text-align: center;
        background: url(1.png) no-repeat;
    }
    /*放大缩小*/
    @-webkit-keyframes scale {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(.85);
        }

        100% {
            transform: scale(1);
        }
    }

    @keyframes scale {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(.85);
        }

        100% {
            transform: scale(1);
        }
    }
    .item-scale{
        animation: scale 1.3s infinite;
    }
    /*上下浮动*/
    @-webkit-keyframes bounce2 {
        0% {
            transform: translateY(-15px);
        }

        50% {
            transform: translateY(0px);
        }

        100% {
            transform: translateY(-15px);
        }
    }

    @keyframes bounce2 {
        0% {
            transform: translateY(-15px);
        }

        50% {
            transform: translateY(0px);
        }

        100% {
            transform: translateY(-15px);
        }
    }
    .item-top{
        animation: bounce2 1s infinite;
    }
    /*闪烁*/
    @-webkit-keyframes opacityChange {
        0% {
            opacity: 1;
        }

        50% {
            opacity: .5;
        }

        100% {
            opacity: 1;
        }
    }

    @keyframes opacityChange {
        0% {
            opacity: 1;
        }

        50% {
            opacity: .5;
        }

        100% {
            opacity: 1;
        }
    }
    .item-opacity{
        animation: opacityChange 1s infinite;
    }
    /*弧形轨迹运行*/
    .box{
        position: relative;
        width: 1420px;
        height: 50px;
        padding-top: 100px;
    }
    @keyframes round {
        to { 
            transform: rotate(.25turn);
        }

        0% {
            opacity: .8;
        }

        50% {
            opacity: 1;
        }

        100% {
            opacity: .3;
        }
    }
    .animate-round {
        animation: round 4s infinite linear;
        transform-origin: 390px 380px;
    }
    /*翻转动画*/
    @keyframes luckRotate {
        0% {
            transform: rotateY(0deg);
        }
        50% {
            transform: rotateY(90deg);
        }
        100% {
            transform: rotateY(0deg);
        }
    }

    /* Safari and Chrome */
    @-webkit-keyframes luckRotate {
        0% {
            transform: rotateY(0deg);
        }
        50% {
            transform: rotateY(90deg);
        }
        100% {
            transform: rotateY(0deg);
        }
    }
    .luck-animate{
        width: 160px;
        height: 200px;
        margin: 0 0 0 50px;
        background: linear-gradient(90deg, #9ccc65 45%, #cde5b2 50%, #9ccc65 55%);
        animation: luckRotate 1s linear infinite;
    }
    
</style>
</head>
<body>
    <p>三角形</p>
    <div class="triangle-top"></div>
    <div class="triangle-right"></div>
    <div class="triangle-bottom"></div>
    <div class="triangle-left"></div>
    <p>按钮hover样式</p>
    <div class="box1"><button class="button-ujarak">按钮hover</button></div>
    <p>闪光按钮动画</p>
    <button class="shiny">纯色背景按钮</button>
    <button class="button">
        背景图片按钮
        <div class="twinkling"></div>
    </button>
    <p>放大缩小动画</p>
    <button class="item-scale">我是按钮</button>
    <p>上下浮动</p>
    <button class="item-top">我是按钮</button>
    <p>闪烁</p>
    <button class="item-opacity">我是按钮</button>
    <p>弧形轨迹运行</p>
    <div class="box">
        <img src="2.png" alt="小火箭" class="animate-round"/>
    </div>
    <p>翻转动画</p>
    <div class="luck-animate">翻转动画</div>
    
</body>
</html> 